<div class="top_nav">
    <div class="nav_menu">
        <nav>
            <div class="nav toggle">
                <a id="menu_toggle"><i class="fa fa-bars"></i></a>
            </div>
            <ul class="nav navbar-nav navbar-right">
                <li class="">
                    <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown"
                       aria-expanded="false">
                        <img src="images/loading.gif" alt="">
                        @if($user['username'])
                            {{$user['username']}}
                        @else
                            管理员
                        @endif
                        <span class="fa fa-angle-down"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-usermenu pull-right">
                        <li><a data-toggle="modal" title="修改密码" data-target="#updPasswordModal">修改密码</a></li>
                        <li>
                            <a href="/config">
                                <span>系统配置</span>
                            </a>
                        </li>
                        <li><a href="/passport/logout"><i class="fa fa-sign-out pull-right"></i> 退出系统</a></li>
                    </ul>
                </li>
                <li role="presentation" class="dropdown">
                    <a href="javascript:;" class="dropdown-toggle info-number" data-toggle="dropdown" aria-expanded="false">
                        <i class="fa fa-envelope-o" aria-hidden="true"></i>
                        <span class="badge bg-green noticeNum">100</span>
                    </a>
                    <ul id="menu1" class="dropdown-menu list-unstyled msg_list" role="menu">
                        <li>
                            <a href="/comments">
                                <span class="image">
{{--                                    <img src="${item.avatar}" onerror="this.src='/images/user.png'"--}}
{{--                                                         alt="user avatar">--}}
                                </span>
                                <span>
{{--                                    <span>${item.nickname}</span>--}}
{{--                                    <span class="time">${item.createTime?string('yyyy-MM-dd HH:mm:ss')}</span>--}}
                                </span>
                                <span class="message">点击查看&审核</span>
                            </a>
                        </li>
                        <li id="event-li">
                            <div class="text-center">
                                <a href="/comments">
                                    <strong>立即处理</strong>
                                    <i class="fa fa-angle-right"></i>
                                </a>
                            </div>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="{{$config['siteUrl']}}" target="_blank">
                        <i class="fa fa-desktop"> 访问前台</i>
                    </a>
                </li>
            </ul>
        </nav>
    </div>
</div>

<div class="modal fade" id="updPasswordModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel2">修改密码</h4>
            </div>
            <div class="modal-body">
                <form action="" class="form-horizontal form-label-left" role="form" id="updPassForm">
                    <input type="hidden" name="id" value="<#if user??>${user.id?c}</#if>">
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-3" for="password">旧密码 <span
                                    class="required">*</span></label>
                        <div class="col-sm-7 col-md-7 col-xs-7">
                            <input class="form-control" id="oldPassword" name="password" required="required"
                                   type="password" minlength="6" maxlength="15">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label for="newPassword" class="control-label col-md-3 col-sm-3 col-xs-3">新密码 <span
                                    class="required">*</span></label>
                        <div class="col-sm-7 col-md-7 col-xs-7">
                            <input id="newPassword" type="password" name="newPassword" data-validate-length="5,20"
                                   class="form-control" required="required" minlength="6" maxlength="15">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label for="newPasswordRepeat" class="control-label col-md-3 col-sm-3 col-xs-3">重复新密码 <span
                                    class="required">*</span></label>
                        <div class="col-sm-7 col-md-7 col-xs-7">
                            <input id="newPasswordRepeat" type="password" name="newPasswordRepeat"
                                   data-validate-linked="newPassword" class="form-control" required="required"
                                   minlength="6" maxlength="15">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"> 关闭</i>
                </button>
                <button type="button" class="btn btn-primary" id="updPassBtn">修改密码</button>
            </div>
        </div>
    </div>
</div>
